import service from '@/utils/request';


export const getlistUser = (pageIndex = 1, pageSize = 10) => {
    return service({
        url: '/user/listNWYLUser',
        method: 'get',
        params: {
            pageIndex,
            pageSize,
        },
    })
};


// 添加主权用户
export const addNWYLUser = (data) => {
    return service({
      url: '/user/createNWYLUser',
      method: 'post',
      data:data
    })
  }

// 删除主权用户
export const deleteNWYLUser = (data) => {
    return service({
      url: '/user/deleteNWYLUser',
      method: 'delete',
      data:data
    })
  }

export const updateNWYLUser = (data) => {
    return service({
        url: '/user/updateUserInfo',
        method: 'post',
        data: data
    })
}

// 修改主权用户
export const updateNWYLUserStatus = (data) => {
    return service({
      url: '/user/updateNWYLUserStatus',
      method: 'put',
      data: data
    })
  }

  export const getApplyNWYLUser = (pageIndex = 1, pageSize = 10) => {
    return service({
        url: '/user/listApplyNWYLUser',
        method: 'get',
        params: {
            pageIndex,
            pageSize,
        },
    })
};

export const getapplyNWYLUserDetail = (DID) => {
    return service({
        url: '/user/applyNWYLUserDetail',
        method: 'get',
        params: {
            DID
        },
    })
};

export const handleApply = (data) => {
    return service({
        url: '/user/handleApply',
        method: 'post',
        data: {
            ApplyResult: data.ApplyResult,
            Did: data.Did
        },
    })
};


